<!DOCTYPE html>
<html lang="en">
<head>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.12"></script>
</head>
<body>
    <div id="app">
        <h4>
            请输入需要传递给子组件的值:<input type="text" v-model="title.v" />
        </h4>
        <child-node v-bind:parenttitle="title"></child-node>
    </div>
    <template id="child">
        <div>
            <h4>Vue 实例中的属性值为{{content.v}}</h4>
        </div>
    </template>
    <script>
        var vm=new Vue({
            el:'#app',
            data:{
                title:{
                    v:0
                }
            },
            components:{
                'childNode':{
                    template:'#child',
                    props:['parenttitle'],
                    data:function(){
                        return{
                            content:this.parenttitle
                        }
                    }
                }
            },
        });
    </script>
</body>
</html>